n = int(input())

res = {1:1}

start = 1
j = 2
for i in range(100):
    start = start+j
    j+=1
    res[start] = start

if res.get(n,False):
    print('YES')
else:
    print('NO')